package com.kyrioscraft.cloud.feignclient;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
public class TestController {

    @Autowired
    FeignRequestServcie feignRequestServcie;

    @GetMapping("/testFeign")
    public List<String> getTest(){
        return feignRequestServcie.getLst();
    }

    public List<String> defaultFallback(){
        List<String> lst = new ArrayList<>();
        lst.add("拼命加载中...");
        return lst;
    }
}
